using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ShootBall : MonoBehaviour
{
    public float force;
    public Rigidbody me;
    public Rigidbody target;
    public void Shoot()
    {
        var direction = (target.transform.localPosition - me.transform.localPosition).normalized;
        me.AddForce(force * direction, ForceMode.VelocityChange);
    }
}
